<template>
  <div class="wfull">
    <a-empty v-if="obj===null"></a-empty>
    <a-form v-else :labelCol="{ span: 4 }" :wrapperCol="{ span: 20 }">
      <a-form-item label="流程事件类型：SUBMIT、RETURN、REVOKE、CANCEL">
        <ZgDicHolder parentCode="eventType" :code="obj.eventType"></ZgDicHolder>
      </a-form-item>
      <a-form-item label="调用方式：API、REFLECT">
        <ZgDicHolder parentCode="callMode" :code="obj.callMode"></ZgDicHolder>
      </a-form-item>
      <a-form-item label="调用地址">
        {{ obj.callUri }}
      </a-form-item>
      <a-form-item label="是否异步">
        <a-tag v-if="obj.isAsync" color="blue">是</a-tag>
        <a-tag v-else color="red">否</a-tag>
      </a-form-item>
      <a-form-item label="执行顺序">
        {{ obj.sort }}
      </a-form-item>
      <a-form-item label="业务逻辑类型">
        <ZgDicHolder parentCode="busiType" :code="obj.busiType"></ZgDicHolder>
      </a-form-item>
      <a-form-item label="是否启用">
        <a-tag v-if="obj.isOpen" color="blue">是</a-tag>
        <a-tag v-else color="red">否</a-tag>
      </a-form-item>
      <a-form-item label="业务描述">
        {{ obj.describ }}
      </a-form-item>
      <a-form-item label="名称">
        {{ obj.name }}
      </a-form-item>
    </a-form>
  </div>
</template>
<script>
import { dic } from './dic'
export default {
  props: {
    obj: {
      type: Object,
      default: () => {
        return null
      }
    }
  },
  data () {
    return {
      dic
    }
  },
  methods: {
    getOptLabel (opts, value) {
      const arr = opts.filter(t => {
        return t.value === value
      })
      if (arr.length > 0) {
        return arr[0].label
      } else {
        return ''
      }
    }
  }
}
</script>

<style lang="scss" scoped>
</style>
